import 'dart:convert';

/**
 * Base64工具类
 */
class Base64Util{
  /*
  * Base64加密
  */
  static String encodeBase64(String? data){
    var content = utf8.encode(data??'');
    var digest = base64Encode(content);
    return digest;
  }

  /*
  * Base64解密
  */
  static String decodeBase64(String? data){
    var string = String.fromCharCodes(base64Decode(data??''));
    var content = utf8.decode((string??'').codeUnits);
    return content;
  }
}